<template>
 <div
    class="header"
    :style="{
      backgroundImage: `url(${sellerIofo.avatar})`,
    }"
  >
  <!-- 磨砂遮盖 -->
    <div class="mask"></div>
    <div class="info">
      <!-- 图片 -->
      <div class="pic">
        <img :src="sellerIofo.avatar" alt="商家logo" />
      </div>
      <!-- 文字标题 -->
      <div class="title">
        <h2>{{ sellerIofo.name }}</h2>
        <p class="one">{{ sellerIofo.description}} / {{sellerIofo.deliveryTime}}分钟送达</p>
        <p> 
          <span>在线支付满28减5,满50建10</span>
          <div>5个 ></div>
        </p>
      </div>
    </div>
    <!-- 底部文字 -->
    <div class="tips">
      <p>
        {{ sellerIofo.bulletin }}
      </p>
    </div>
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";
export default {
  data() {
    return {
    };
  },
  created() {
    this.getSeller();
  },
  computed: {
    ...mapState(["sellerIofo"]),
  },
  methods: {
    ...mapActions(["getSeller", "getGoods"]),
  },
};
</script>

<style lang="less" scoped>
*{
  margin: 0;
  padding: 0;
}
.header {
  height: 134px;
  background: #333;
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  .mask {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    height: 100%;
    background-color: rgba(7, 17, 27, 0.5);
    backdrop-filter: blur(10px);
  }
  .info {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    height: 100%;
    display: flex;
    .pic {
      padding: 24px 0 0 24px;
      img {
        width: 64px;
      }
    }
  }
  .title{
    color: white;
    margin-left: 16px;
    margin-top: 24px;
    flex: 1;
    h2{
      font-size: 16px;
      font-weight: bold;
      line-height: 18px;
      display: flex;
      &::before {
        content: "品牌";
        display: block;
        font-size: 13px;
      background-color: rgb(240, 20, 20);
      color: white ;
      font-weight: 800;
     margin-right: 6px;
     width: 30px;
     height: 16px;
     text-align: center;
     line-height: 16px;
      }
    }
    .one{
      font-size: 12px;
      font-weight: 200;
      line-height: 1;
      margin: 8px 0;
    }
    .one~p{
      font-size: 10px;
      font-weight: 200;
      line-height: 1;
      margin-top: 15px;
      &::before {
        content: "减";
      background-color: white;
      color: rgb(246, 118, 118) ;
      font-weight: 800;
     padding: 0 3px;
      }
    }
    .one~p div{
      float: right;
      background-color: rgba(0, 0, 0, 0.2);
      font-size: 10px;
      color: rgb(255, 255, 255);
      line-height: 24px;
      width: 40px;
      height: 24px;
      margin-right: 12px;
      border-radius: 14px;
      text-align: center;
    }
  }
  .tips {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 10px;
    color: #fff;
    padding-left: 12px;
    background: rgba(7, 17, 27, 0.2);

    p {
      height: 28px;
      line-height: 28px;
      width: 85%;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
      &::before {
        content: "公告";
        width: 35px;
      height: 15px;
      background-color: white;
      color: #333;
      margin: 10px 4px 0 6px;
      font-weight: 800;
      }
    }
  }
}
</style>
